<style lang="scss" scoped>
.box {
    position: relative;
    width: 100%;
    height: 1000%;

    .jichu {
        position: absolute;
        width: 100%;
        height: 60px;
        top: 50px;
        left: 0;
        border-top: 10px solid #e9e8e8;
    }

    .jichu2 {
        display: inline-block;
        width: 100%;
        height: 0px;
        top: 100px;
        left: 0;
        position: absolute;
    }

    .jichu3 {
        display: inline-block;
        width: 100%;
        height: 0px;
        top: 150px;
        left: 0;
        position: absolute;
    }

    .jichu4 {
        display: inline-block;
        width: 100%;
        height: 60px;
        top: 220px;
        border-top: 10px solid #e9e8e8;
        left: 0;
        position: absolute;
    }

    .jichu5 {
        display: inline-block;
        width: 100%;
        height: 60px;
        top: 280px;
        left: 0;
        position: absolute;
    }

    .jichu6 {
        display: inline-block;
        width: 100%;
        height: 60px;
        top: 340px;
        left: 0;
        position: absolute;
    }

    .jichu7 {
        width: 80%;
        height: 50px;
        top: 420px;
        left: 30px;
        border-radius: 30px;
        color: red;
        font-size: 16px;
        position: absolute;
    }
}
</style>

<template>
    <div class="box">
        <van-nav-bar title="退出" left-text="返回" left-arrow @click-left="$router.go(-1)" />
        <van-cell is-link title="账号设置" class="jichu" @click="zhanghao" />
        <span class="jichu2"><van-cell is-link title="家庭联系人" @click="lianxiren" /></span>
        <span @click="adress" class="jichu3"><van-cell is-link title="地址管理" /></span>
        <a href="https://www.jiangxinyanyi.com/inforabout?type=7"> <span class="jichu4"><van-cell
                    is-link title="隐私" /></span> </a>
        <a href="https://www.bjtzh.gov.cn/bjtz/public/flsm/"> <span class="jichu5"><van-cell is-link
                    title="法律声明" /></span> </a>
        <a
            href="https://baike.baidu.com/item/%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E5%8A%B3%E5%8A%A8%E6%B3%95%EF%BC%882009%E5%B9%B48%E6%9C%8827%E6%97%A5%E4%BF%AE%E6%AD%A3%E7%89%88%EF%BC%89/18631466?fr=ge_ala"><span
                class="jichu6"><van-cell is-link title="关于我们" /></span></a>
        <van-button class="jichu7" @click="edit">退出登录</van-button>
    </div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter()
const edit = () => {
    if (confirm('确定退出吗?')) {
        localStorage.removeItem('token')
        localStorage.removeItem('user')
        router.push('/login')
    }
}
const adress = () => {
    router.push('/dizhi')
}
const zhanghao = () => {
    router.push('/zhanghao')
}
const lianxiren = () => {
    router.push('/jiating')
}
</script>
